public class Point2D{

    private double x;
    private double y; 

    public Point2D(){
	x = 0;
	y = 0;
    }

    public Point2D(double posX, double posY){

	x = posX;
	y = posY;
	
    }

    public double getX(){

	return this.x;
    }

    public double getY(){

	return this.y;
    }

    public void setX(double newX){
	this.x = newX;
    }

    public void setY(double newY){
	this.y = newY;
    }

    public void setXY(double newX, double newY){
	setX(newX);
	setY(newY);
    }

    public void translater(double vx, double vy){
	this.x += vx;
	this.y += vy;	
    }

    public Point2D dupliquer()
    {
	return new Point2D(x,y);
    }

    public boolean equals(Point2D p){
	return 
	    this.x == p.x 
	    &&
	    this.y == p.y;
    }

    /*public static void main(String []argv){
	Point2D p = new Point2D(3,4);
	System.out.println("x =" + p.getX() + "  y = "+p.getY());
	p.translater(2,2);
	System.out.println("x =" + p.getX() + "  y = "+p.getY());

	}*/

}
	